<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="css/font-family.css">
    <link rel="stylesheet" href="css/swiper.css">
    <link rel="stylesheet" href="css/index.css">
    <link rel="stylesheet" href="css/travel-note.css">
    <script src="js/jquery-3.3.1.min.js"></script>
    <!-- <script src="js/comment.js"></script> -->
    <title>Travel Sharer</title>
</head>
<body>
    <!-- 导航 start -->
    <div class="nav-top">
        <div class="nav-login">
            <div class="nav-head">
                <a href="login.html">
                    <img class="login-img" src="img/head.png" alt="">
                    <span>Log In/ Sign Up</span>
                </a>
            </div>
            <div class="nav-link">
                <a href="https://www.facebook.com/">
                    <img src="img/fb.png" alt="">
                </a>
                <a href="https://www.instagram.com/">
                    <img src="img/ins.png" alt="">
                </a>
            </div>
        </div>
        <nav class="nav-list">
            <ul class="nav-detail">
                <li><a href="index.html" >Hmoe</a></li>
                <li><a href="travelNote.html">Travel Note</a></li>
                <li><a href="findTraveller.html">Find Traveller</a></li>
                <li><a href="discover.html">Discover</a></li>
                <li><a href="#" class="nav-action">My Post</a></li>
                <li><a href="members.html">Members</a></li>
                <li><a href="myCollection.html">My Collection</a></li>
                <li><a href="about.html">About</a></li>
            </ul>
            <div class="nav-search">
                <img src="img/search.png" alt="">
                <input type="text" placeholder="Search Site">
            </div>
        </nav>
    </div>
    <!-- 导航 end -->
    <!-- 中部 start -->
    <div class="center-box">
        <div class="user-list">
            <div class="add-user">
                <button id="addUserBtn">新增</button>
            </div>
            <table class="list-box">
                <thead> 
                    <tr>
                        <th>用户id</th>
                        <th>用户邮箱</th>
                        <th>关注时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>123</td>
                        <td>123456@qq.com</td>
                        <td>2018-08-08</td>
                        <td><span class="delete-user">删除</span></td>
                    </tr>
                    <tr>
                        <td>123</td>
                        <td>123456@qq.com</td>
                        <td>2018-08-08</td>
                        <td><span class="delete-user">删除</span></td>
                    </tr>
                    <tr>
                        <td>123</td>
                        <td>123456@qq.com</td>
                        <td>2018-08-08</td>
                        <td><span class="delete-user">删除</span></td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="user-form" style="display: none;">
            <ul class="add-user-form">
                <li><span>标题</span> <input type="text"></li>
                <li><span>作者</span> <input type="text"></li>
                <li><span>类别</span> <input type="text"></li>
                <li><span>图片</span> 
                    <input type="text" class="img-input" id="show-path"/>
                    <button  class="img-btn" id="btn">选择图片</button>
                    <input type="file" id="upload" style="display: none;" />
                </li>
                <li><span>内容</span> <textarea name="" id="" ></textarea></li>
            </ul>
            <div class="add-btn">
                <button class="back-list">返回</button>
                <button>确定</button>
            </div>
        </div>
    </div>
    <!-- 中部 end -->

    <!-- 弹窗 start -->
    <!-- 新增 start -->
    <div class="model-background" id="addUser" style="display: none;"></div>
    <div class="model-body" id="addUserBody" style="display: none;">
        <div class="model-title">
            新增用户
            <span class="model-close close-model">
                ×
            </span>
        </div>
        <div class="model-content" >
            <p class="delete-tip">删除后将无法恢复，确定删除？</p>
        </div>
        <div class="model-footer">
            <button class="cancle-add close-model">取消</button>
            <button class="confirm-add">确定</button>
        </div>
    </div>
    <!-- 新增 end -->
    <!-- 弹窗 start -->

    <!-- 底部 start -->
    <footer class="bottom-box">
        <div class="bottom-bg">
            <img src="img/bottomBg.png" alt="">
        </div>
        <div class="bottom-content">
            <div class="content-left">
                <!-- <img src="img/bottomImg.png" alt=""> -->
            </div>
            <div class="content-right">
                <div class="about-us">ABOUT US</div>
                <div class="us-info">
                    <span>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</span>
                    
                    <span class="us-info-add">​XXXXXXXXXXXXXXXXXXXXXXXXXXXX</span>
                </div>
                <div class="us-more">
                    <a href="about.html" class="us-more-a">
                        <div>
                            READ MORE
                        </div>
                    </a>
                </div>
            </div>
        </div>
        <div class="bottom-copy">
            <div class="copy-css">© 2019 by Travel Sharer.</div>
        </div>
    </footer>
    <!-- 底部 end -->
<script>
     //上传图片样式，获取路径
     $('#btn').click(function(){
        $('#upload').click();
        $('#upload').change(function(){
            $('#show-path').val(this.value);  //获取文件伪路径
        })
    })

    //删除
    $('.delete-user').click(function(){
        $('#addUser').show();
        $('#addUserBody').show();
    })

    //关闭或取消
    $('.close-model').click(function(){
        $('#addUser').hide();
        $('#addUserBody').hide();
    })
    
    //确定删除
    $('.confirm-add').click(function(){ 
        $('#addUser').hide();
        $('#addUserBody').hide();
    })


    //点击新增
    $('#addUserBtn').click(function(){
        $('.user-list').hide();
        $('.user-form').show();
    })

    //点击返回
    $('.back-list').click(function(){
        $('.user-list').show();
        $('.user-form').hide();
    })
</script>
</body>
</html>